package com.xxxx.game;

import android.graphics.Canvas;

public class DelayDrawing implements ICanvasDrawing {

	private int mDelayTime;
	private ICanvasDrawing mDrawing;
	
	public DelayDrawing(int iDelay, ICanvasDrawing iDrawing)
	{
		this.mDelayTime = iDelay;
		this.mDrawing = iDrawing;
	}
	
	@Override
	public boolean paint(Canvas canvas, ISprite sprite) {
		if(--this.mDelayTime > 0)
			return true;
		
		return this.mDrawing.paint(canvas, sprite);
	}

	@Override
	public String getName() {
		return "DelayDrawing";
	}

}
